package com.eorchis.module.predeptassignedinfo.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;



import org.hibernate.annotations.GenericGenerator;

import com.eorchis.core.basedao.entity.IBaseEntity;
import com.eorchis.module.signupdept.domain.SignupDept;

/**
 * Title: PreDeptAssignedInfo<br>
 * Description: 单位年度预分配参学名额表实体对象<br>
 * Company: GoldGov<br>
 * Copyright @ 2012 GoldGov .All rights reserved.<br>
 * @author Administrator
 * @createDate 2015-01-25
 * @version $Revision$
 */
@Entity
@Table(name = "PRE_DEPT_ASSIGNED_INFO")
public class PreDeptAssignedInfo implements IBaseEntity {
	private static final long serialVersionUID = 1L;
	/**
	 * 培训班类型：普通班
	 */
	public final static Integer ORDINARY_CLASS = new Integer(1);
	/**
	 * 培训班类型：国防班
	 */
	public final static Integer DEFENSE_CLASS = new Integer(2);
	private String id;//主键ID
	private Integer classType;//培训班类型     1:普通班（包括班级表中的普通班和定向班）      2：国防班
	private Integer year;//年份
	private Integer restrictPersonNum;//限报人数
	private SignupDept department;//部门
	

	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(name="ID")
	/**
	 * 设置主键ID
	 */		
	public String getId() {
		return id;
	}
	/**
	 * 获取主键ID
	 */		
	public void setId(String id) {
		this.id = id;
	}
	@Column(name="CLASS_TYPE")
	/**
	 * 设置班级类型
	 */		
	public Integer getClassType() {
		return classType;
	}
	/**
	 * 获取班级类型
	 */		
	public void setClassType(Integer classType) {
		this.classType = classType;
	}
	@Column(name="YEAR")
	/**
	 * 设置年份
	 */		
	public Integer getYear() {
		return year;
	}
	/**
	 * 获取年份
	 */		
	public void setYear(Integer year) {
		this.year = year;
	}
	@Column(name="RESTRICT_PERSON_NUM")
	/**
	 * 设置限报人数
	 */		
	public Integer getRestrictPersonNum() {
		return restrictPersonNum;
	}
	/**
	 * 获取限报人数
	 */		
	public void setRestrictPersonNum(Integer restrictPersonNum) {
		this.restrictPersonNum = restrictPersonNum;
	}
	/**
	 * 获取部门
	 */
	@ManyToOne(fetch = FetchType.EAGER, optional = true)
	@JoinColumn(name="DEPID", referencedColumnName = "DEPID")
	public SignupDept getDepartment() {
		return department;
	}
	/**
	 * 设置部门
	 */
	public void setDepartment(SignupDept department) {
		this.department = department;
	}
	

	/**
	 * 记录日志使用
	 */
	public String toString() {
		return "主键ID======>" + getId()+"\n班级类型======>" + getClassType()+"\n年份======>" + getYear()+"\n限报人数======>" + getRestrictPersonNum();
	}
}
